package com.lwy.springbootdemo01.config;


import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;
//配druid 读取配置信息

/**
 * 原始读取 配置的是Druid 连接池
 */
//@Configuration
//@EnableConfigurationProperties(Jdbcproperties.class)           //引入配置项类
public class JdbcConfig {

//
//    @Bean
//    public DataSource dataSource(Jdbcproperties jdbcproperties){
//        //传入jdbc配置类读取信息
//        DruidDataSource source = new DruidDataSource();
//        source.setDriverClassName(jdbcproperties.getDriverClassName());
//        source.setUrl(jdbcproperties.getUrl());
//        source.setUsername(jdbcproperties.getUsername());
//        source.setPassword(jdbcproperties.getPassword());
//
//
//        return source;
//
//    }


}
